package main

import (
	"fmt"
	"math"
)

func main() {
	fmt.Println(powWithLimit(3, 4, 10))
}

func powWithLimit(x, y, limit float64) float64 {
	if result := math.Pow(x, y); result < limit {
		return result
	} else {
		return limit
	}
}
